<?php
namespace app\xapply\model;

use think\Model;
use app\xapply\model\Category;
use app\xapply\model\Rule;
use app\xapply\model\Message;

class App extends Model
{
    protected $name = 'xapply_app';

    public function category()
    {
        return $this->belongsTo(Category::class, 'category_id', 'id');
    }

    public function rules()
    {
        return $this->hasMany(Rule::class, 'app_id', 'id');
    }

    public function messages()
    {
        return $this->hasMany(Message::class, 'app_id', 'id');
    }
}
